﻿<%@ Page Language="C#" %>

<% 
    DTO.NguoiDungDto nguoidung = new DTO.NguoiDungDto();
    
    nguoidung.Ma = int.Parse(Request["ma"]);
    nguoidung.HoTen = Request["hoten"];
  
    nguoidung.TenDangNhap = Request["tendangnhap"];
    nguoidung.NgaySinh = DateTime.Parse(Request["ngaysinh"]);
    nguoidung.LoaiNguoiDung = int.Parse(Request["loainguoidung"]);
    nguoidung.SoTaiKhoan = Request["sotaikhoan"];
    nguoidung.TrangThai = Request["trangthai"];
    nguoidung.DiaChi = Request["diachi"];
    nguoidung.Diem = int.Parse(Request["diem"]);
    nguoidung.DienThoai = Request["dienthoai"];
    nguoidung.Email = Request["email"];
    

    if (
        BUS.NguoiDungBus.CapnhatNguoiDung(nguoidung) == true &&
        BUS.NguoiDungBus.PhanquyenNguoiDung(nguoidung, nguoidung.LoaiNguoiDung) == true &&
        BUS.NguoiDungBus.CapnhatTrangThaiNguoiDung(nguoidung, nguoidung.TrangThai) == true)
        Response.Write(1);
    else
        Response.Write(0);
%>